package homework.day10;

/**
 *
 * @since 09:25
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
}

class Student {
    int age;
    String name;
    static int var = 100;

    public Student() {
    }

    public Student(int age) {
        this.age = age;
    }

    public Student(String name) {
        // 自身类的成员变量不能够作为自身调用其他构造器的参数
        // Cannot reference 'Student.var' before supertype constructor has been called
        this(var);
        this.name = name;
    }
}